Print unknown errors with --verbose
authorAlex Crichton <alex@alexcrichton.com>
Wed, 23 Jul 2014 16:35:22 +0000 (09:35 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 23 Jul 2014 19:19:02 +0000 (12:19 -0700)
src/cargo/lib.rs

index e7b7c491403a46fba526ee39ccd67f58d302d80d..c595684c6453100750082092ac9662ed769e170b 100644 (file)
@@ -202,13 +202,16 @@ pub fn handle_error(err: CliError, shell: &mut MultiShell) {
         let _ = shell.error(error.to_string());
     }
 
-    if error.cause().is_some() {
+    if error.cause().is_some() || unknown {
         let _ = shell.concise(|shell| {
             shell.err().say("\nTo learn more, run the command again with --verbose.", BLACK)
         });
     }
 
     let _ = shell.verbose(|shell| {
+        if unknown {
+            let _ = shell.error(error.to_string());
+        }
         error.cause().map(|err| {
             let _ = handle_cause(err, shell);
         });